﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace WpfApp1.Controls
{
    public class NavConductor : ContentControl
    {
        public string Contract
        {
            get { return (string)GetValue(ContractProperty); }
            set { SetValue(ContractProperty, value); }
        }

        public static readonly DependencyProperty ContractProperty =
            DependencyProperty.Register("Contract", typeof(string), typeof(NavConductor), new PropertyMetadata());

        protected override void OnContentChanged(object oldContent, object newContent)
        {
            if (newContent is ContentControl cc) { AttachContent(cc); }
            else if (newContent is ItemsControl ic) { AttachItemsControl(ic); }

            base.OnContentChanged(oldContent, newContent);
        }

        private void AttachContent(ContentControl cc)
        {
        }

        private void AttachItemsControl(ItemsControl ic)
        {
            throw new NotImplementedException();
        }

    }
}
